# Contributor: guddaff <alpine@guddaff.de>
# Maintainer: guddaff <alpine@guddaff.de>
pkgname=wtfutil
pkgver=0.43.0
pkgrel=8
pkgdesc="personal information dashboard"
url="https://wtfutil.com/"
arch="all"
license="MPL-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/wtfutil/wtf/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/wtf-$pkgver"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o bin/wtfutil
}

check() {
	# hangs
	# shellcheck disable=2046
	go test $(go list ./... | grep -Ev '(wtf/modules/urlcheck|wtf/view)')
}

package() {
	install -Dm755 bin/wtfutil "$pkgdir"/usr/bin/wtfutil
}

sha512sums="
0e6c67add5bc90795503b9f337b377ad2b0a13d1ff4357971ed518f49979eac2c67a1df0fc86846c79616f96ccbf40cb2089185d55596b77832ebdea9213e212  wtfutil-0.43.0.tar.gz
"
